<template>
    <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item v-for="(item,index) in breadList" :key="index" :to="{ path: item.path }">
            {{item.title}}
        </el-breadcrumb-item>
    </el-breadcrumb>
</template>

<script>
	export default {
		name: 'Breadcrumb',
        data () {
            return {
                breadList: []
            }
        },
        watch:{
            $route(){
                this.getBreadcrumb();
            }
        },
        methods: {
            isHome(route) {
                return route.name === "首页";
            },
            getBreadcrumb() {
                this.breadList = this.$route.meta.titlePath;
            }
        },
        created() {
		    console.log('Breadcrumb')
            this.getBreadcrumb();
        }
	}
</script>

<style scoped>
    .el-breadcrumb{
        margin-bottom: 15px;
    }
</style>

